// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package main

import (
	"os"
	"testing"
)

func TestMainFunc(t *testing.T) {
	//os.Setenv("KUBERNETES_SERVICE_HOST", "10.61.8.31")
	os.Setenv("KUBERNETES_SERVICE_HOST", "10.59.14.114 ")
	//os.Setenv("KUBERNETES_SERVICE_PORT", "6443")
	os.Setenv("KUBERNETES_SERVICE_PORT", "6443")
	//router := setupRouter(config.LoadConf("/matrix/etc/conf/application.yaml"))

	//Convey("list", t, func() {
	//
	//	w := httptest.NewRecorder()
	//	req, _ := http.NewRequest("GET", "/deploy/v1/service", nil)
	//	router.ServeHTTP(w, req)
	//
	//	respond := make(map[string]interface{}, 0)
	//
	//	So(w.Code, ShouldEqual, 200)
	//	err := json.Unmarshal(w.Body.Bytes(), &respond)
	//	So(err, ShouldEqual, nil)
	//
	//	So(respond["success"], ShouldEqual, true)
	//})
}
